package com.wnhz.work.jy.adapter;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.TextView;

import com.wnhz.work.jy.R;
import com.wnhz.work.jy.bean.ManageMoneyBean;

import java.util.List;

/**
 * Created by d on 2016/10/14.
 */
public class Home2Fragment1Adapter extends BaseAdapter{

    private Context context;

    private List<ManageMoneyBean> list;

    public Home2Fragment1Adapter(Context context, List<ManageMoneyBean> list) {
        this.context = context;
        this.list = list;
    }

    @Override
    public int getCount() {
        return list.size();
    }

    @Override
    public Object getItem(int i) {
        return null;
    }

    @Override
    public long getItemId(int i) {
        return 0;
    }

    @Override
    public View getView(int i, View view, ViewGroup viewGroup) {

        MyHolder holder;
        if (view == null){
            holder = new MyHolder();
            view = LayoutInflater.from(context).inflate(R.layout.trend_item,null);
            holder.tv_name = (TextView) view.findViewById(R.id.tv_name);
            holder.tv_zhangfu = (TextView) view.findViewById(R.id.tv_zhangfu);
            holder.tv_number = (TextView) view.findViewById(R.id.tv_number);
            holder.iv_pic = (ImageView) view.findViewById(R.id.iv_pic);
            view.setTag(holder);
        }
        holder = (MyHolder) view.getTag();
        return view;
    }

    private class MyHolder{
        TextView tv_name;
        TextView tv_zhangfu;
        TextView tv_number;
        ImageView iv_pic;

    }
}
